# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=minissdpd
pkgver=1.6.0
pkgrel=1
pkgdesc="MiniSSDP Daemon"
url="http://miniupnp.free.fr/minissdpd.html"
arch="all"
license="BSD-3-Clause"
makedepends="libnfnetlink-dev linux-headers bsd-compat-headers"
subpackages="$pkgname-doc $pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://miniupnp.tuxfamily.org/files/download.php?file=minissdpd-$pkgver.tar.gz
	$pkgname.initd
	$pkgname.confd
	remove-install-shipped-initd.patch"

build() {
	PREFIX=/usr make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	install -m755 -D "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/$pkgname
	install -m644 -D "$srcdir"/$pkgname.confd \
		"$pkgdir"/etc/conf.d/$pkgname
}

sha512sums="
1415f241e3c417eae32d37707c67594b16e56eec34ce6a8c511272d178f465553642362ba7240271df8f18fe39f6613c1d919344ee13bbd6a99f9a706be67d37  minissdpd-1.6.0.tar.gz
66c0822bc9166cd02faf57a58d0f843a85ecf71d3f852829197c8f81bcfd52358a115f2244520ffe50746aa7274d76c30365f927bc1cf5faf47485e91a44805f  minissdpd.initd
5ac723cb5b3d3f8bb97989cffb174f22566fcebff304e40f12ca5144cfa94b00614fdf6925e2c5a1dd0f8fa533aac12e991bad0d0909cbdd90a9b7ed73e0c296  minissdpd.confd
08eb4d996f5f55940caf6f55f44586166c01bb78fe3e92db002628800a87ceb41986b1fed831d4423ea2fcdccb4b3976665ccd3539881f230913d98d0205b41f  remove-install-shipped-initd.patch
"
